Generally, a keyboard area of smart phones and tablet computers is small and may not be convenient for use. An external keyboard generally uses a Hall sensor to trigger an input function by electromagnetic induction. However, an external keyboard requires an additional detection circuit and a magnet, which increases a number of components and a weight of the keyboard and increases product cost of the external keyboard.